﻿using System;
using HaloReachApi.Responses;

namespace HaloReachApi
{
    public class GameHistoryService : BaseReachApiJsonService<GameHistoryResponse>
    {
        private const string uri = "http://www.bungie.net/api/reach/reachapijson.svc/player/gamehistory/{0}/{1}/{2}/{3}";

        public GameHistoryService()
            : base()
        { }

        public GameHistoryService(string key)
            : base(key)
        { }

        public void GetGameHistoryAsync(string gamerTag, ReachGameVariantClass variant = ReachGameVariantClass.Unknown, int pageNum = 0)
        {
            StartServiceCall(String.Format(uri, apiKey, gamerTag, variant.ToString(), pageNum));
        }
    }
}
